<template>
  <div>
    <custom-card title="电器件" class="mt-30">
      <el-table :data="detail.electronicsList " border fit highlight-current-row style="width: 100%">
        <el-table-column align="center" label="名称" prop="nameCn">
        </el-table-column>
        <el-table-column align="center" label="规格" prop="standard">
        </el-table-column>
        <el-table-column align="center" label="厂商" prop="manufacturer"></el-table-column>
        <el-table-column align="center" label="认证" prop="cert"></el-table-column>
      </el-table>
    </custom-card>
    <custom-card title="结构件" class="mt-30">
      <el-table :data="detail.structuresList" border fit highlight-current-row style="width: 100%">
        <el-table-column align="center" label="名称" prop="nameCn">
        </el-table-column>
        <el-table-column align="center" label="规格" prop="standard">
        </el-table-column>
        <el-table-column align="center" label="厂商" prop="manufacturer"></el-table-column>
        <el-table-column align="center" label="控制点" prop="controlPoint"></el-table-column>
      </el-table>
    </custom-card>
    <custom-card title="控制要点" class="mt-30">
      <el-table :data="detail.controlPointsList" border fit highlight-current-row style="width: 100%">
        <el-table-column align="center" label="名称" prop="nameCn">
        </el-table-column>
        <el-table-column align="center" label="内容" prop="context"></el-table-column>
      </el-table>
    </custom-card>
  </div>
</template>

<script>
  import { mapGetters } from 'vuex';
  import CustomCard from '@/components/CustomCard/index';
  import * as api from '@/api/product/pcc/index';

  export default {
    name: 'DetailPbs',
    components: {
      CustomCard
    },
    props: {
      // modelPbsId: {
      //   type: String,
      //   default: ''
      // }
    },
    data() {
      return {
        detail: {}
      };
    },
    computed: {
      ...mapGetters(['elements', 'language', 'dict'])
    },
    created() {
      this.init()
    },
    activated() {
      this.init();
    },
    methods: {
      init() {
        api.getFilePcc({
          modelPbsId: this.$route.query.modelPbsId
        }).then(res => {
          console.log(res)
          this.detail = res.data
        });
      }
    }
  };
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
</style>
